{% extends 'user_home/user.html' %}
{% block title %}
    <title>wages</title>
{% endblock %}


{% block extcss %}
    {{ super() }}
    <link rel="stylesheet" href="../static/css/user_home/wages.css">
{% endblock %}

{% block one %}
    <table class="table">
        <thead>
          <tr>
              <th>姓名</th>
              <th>性别</th>
              <th>加班时长</th>
              <th>基础工资</th>
              <th>加班费</th>
              <th>总工资</th>
          </tr>
        </thead>
        <tbody>
        <tr>
            <td>{{ users.name }}</td>
            <td>
                {% if users.gender == 1 %}
            	    男
                {% else %}
                  女
                {% endif %}
            </td>
            <td>{{ users.overtime }}</td>
            <td>{{ users.department.wages +  users.job.wages }}</td>
            <td>{{ "%.2f"|format(( users.department.wages + users.job.wages ) * ( Decimal(0.01) * users.overtime )) }}</td>
            <td>{{ "%.2f"|format(( users.department.wages + users.job.wages ) * ( Decimal(0.01) * users.overtime + Decimal(1))) }}</td>
        </tr>
        </tbody>
    </table>
{% endblock %}